<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1">
  <link rel="shortcut icon" type="image/png" href="icon.png">
  <title>Test</title>
  <link href="https://cdn.bootcss.com/font-awesome/5.12.1/css/all.min.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  <script src="/code/yao2048.js"></script>
  <script src="/code/yaoplayer.js"></script>
</head>

<body>
  <div id="test"></div>
  <script>
    var _2048 = new Yao2048(document.querySelector('#test'));
    _2048.show();

    $.get('https://v1.itooi.cn/netease/songList', {
      'id': 998389130
    }, function (json) {
      if (json.data != undefined && json.data != null &&
        json.data.tracks != undefined && json.data.tracks != null) {
        $('#test').append(new YaoPlayer('YaoPlayer', json.data.tracks.map(song => {
          return {
            'name': song.name,
            'singer': song.artists.map(artist => artist.name).join(', '),
            'lrc': 'Not found',
            'pic': song.album.picUrl,
            'url': `https://v1.itooi.cn/netease/url?id=${song.id}&quality=128`
          };
        })));
      }
    }, 'json');
  </script>
</body>

</html>